<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>显示页面</title>
</head>
<body>
<center>
    <h3>用户信息</h3>
    <a th:href="@{/user/toAdd}">添加用户信息</a>
    <hr>
    <table border="1px" cellpadding="0px" cellspacing="0px" style="text-align: center;width: 700px">
        <tr>
            <td>编号</td>
            <td>账号</td>
            <td>密码</td>
            <td>地址</td>
            <td>入职日期</td>
            <td>职位</td>
            <td>操作</td>
        </tr>
        <tr th:each="users:${user}">
            <td th:text="${users.userld}"></td>
            <td th:text="${users.userName}"></td>
            <td th:text="${users.password}"></td>
            <td th:text="${users.address}"></td>
            <td th:text="${#dates.format(users.inputDate,'yyyy-MM-dd')}"></td>
            <td th:text="${users.roleId==1?'管理员':'普通用户'}"></td>
            <td><a th:href="@{/user/findById/{id}(id=${users.userld})}">修改</a> <a th:href="@{/user/del/{id}(id=${users.userld})}">删除</a></td>
        </tr>
    </table>
</center>
</body>
</html>